package com.maweirdos.ai.core.memory.storage;

import com.maweirdos.ai.entity.ChatMessage;
import org.springframework.ai.chat.memory.ChatMemoryRepository;

import java.util.List;

/**
 * Author:  Maweirdos
 * Date:  2025/7/4 19:35
 * Description:  消息持久化repository，拓展
 * {@link org.springframework.ai.chat.memory.ChatMemoryRepository}
 */
public interface extensionChatMemoryRepository extends ChatMemoryRepository {

    /**
     * 根据会话id和消息类型查询消息
     * @param conversationId
     * @param messageType
     * @return
     */
    List<ChatMessage> findByConversationIdAndMessageType(String conversationId, String messageType);

    /**
     * 根据会话id删除消息
     * @param ids
     */
    void deleteIds(List<String> ids);
}
